package com.coocaa.x.app.hall.web;

import android.webkit.WebChromeClient;
import android.webkit.WebView;

/**
 * Created by admin on 2015/6/18.
 */
public class HallWebViewChromeClient extends WebChromeClient {

    public interface WebChromeClientListener {
        void onProgressChanged(WebView view, int newProgress);

        void onReceiverTitle(WebView view, String title);
    }

    private WebChromeClientListener mWebChromeClientListener;

    public HallWebViewChromeClient(WebChromeClientListener listener) {
        mWebChromeClientListener = listener;
    }

    @Override
    public void onProgressChanged(WebView view, int newProgress) {
        super.onProgressChanged(view, newProgress);
        mWebChromeClientListener.onProgressChanged(view, newProgress);
    }

    @Override
    public void onReceivedTitle(WebView view, String title) {
        super.onReceivedTitle(view, title);
        mWebChromeClientListener.onReceiverTitle(view, title);
    }
}
